package com.temp.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.temp.dto.SearchUserDTO;
import com.temp.dto.UserRegisterDTO;
import com.temp.entity.User;
import com.temp.vo.CustomPageVO;
import com.temp.vo.UserDetailVO;

import java.math.BigDecimal;
import java.util.List;

public interface UserService extends IService<User> {

    boolean saveUser(User user, String roleName);

    User findByUsername(String username);

    User findByEmail(String email);

    boolean checkLoginNameUnique(String name);

    boolean checkEmailUnique(String email);

    CustomPageVO<UserDetailVO> findAllUserDetail(SearchUserDTO userDTO);

    List<User> selectRandomRobots(int limit);

    void updateUserBalance(Long userId, BigDecimal amount);
}
